#include "gtest/gtest.h"
#include "Rect.h"

USING_NS_B2D

TEST(test_rect, can_construct_from_different_type)
{
	Rectf rectf(0,0,1,1);
	Recti recti(rectf);
}

TEST(test_rect, test_area_and_center)
{
	Rectu rect(0,0,10,10);

	unsigned area_expected = 100;
	uvec2 center_expected(5,5);

	unsigned area_actual = rect.getArea();
	uvec2 center_actual = rect.getCenter();

	EXPECT_EQ(area_expected, area_actual);
	EXPECT_EQ(center_expected, center_actual);
}